package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.stereotype.Service;
import com.ly.heart.mapper.MaterialSaleMapper;
import com.ly.heart.domain.MaterialSaleEntity;
import javax.annotation.Resource;
import com.ly.heart.service.IMaterialSaleService;

/**
 * 物料销售信息Service业务层处理
 * 
 * @author wutao
 * @date 2024-07-04
 */
@Service
public class MaterialSaleServiceImpl extends ServiceImpl<MaterialSaleMapper, MaterialSaleEntity> implements IMaterialSaleService {

    @Resource
    private MaterialSaleMapper materialSaleMapper;

    /**
     * 查询物料销售信息
     * 
     * @param id 物料销售信息ID
     * @return 物料销售信息
     */
    @Override
    public MaterialSaleEntity selectMaterialSaleById(String id)
    {
        return materialSaleMapper.selectMaterialSaleById(id);
    }

    /**
     * 查询物料销售信息列表
     * 
     * @param materialSale 物料销售信息
     * @return 物料销售信息
     */
    @Override
    public List<MaterialSaleEntity> selectMaterialSaleList(MaterialSaleEntity materialSale)
    {
        return materialSaleMapper.selectMaterialSaleList(materialSale);
    }

    /**
     * 新增物料销售信息
     * 
     * @param materialSale 物料销售信息
     * @return 结果
     */
    @Override
    public int insertMaterialSale(MaterialSaleEntity materialSale)
    {
        return materialSaleMapper.insertMaterialSale(materialSale);
    }

    /**
     * 修改物料销售信息
     * 
     * @param materialSale 物料销售信息
     * @return 结果
     */
    @Override
    public int updateMaterialSale(MaterialSaleEntity materialSale)
    {
        return materialSaleMapper.updateMaterialSale(materialSale);
    }

    /**
     * 批量删除物料销售信息
     * 
     * @param ids 需要删除的物料销售信息ID
     * @return 结果
     */
    @Override
    public int deleteMaterialSaleByIds(String[] ids)
    {
        return materialSaleMapper.deleteMaterialSaleByIds(ids);
    }

    /**
     * 删除物料销售信息信息
     * 
     * @param id 物料销售信息ID
     * @return 结果
     */
    @Override
    public int deleteMaterialSaleById(String id)
    {
        return materialSaleMapper.deleteMaterialSaleById(id);
    }
}
